<%@ page import="instructor.sample.*" %>
<% 

int customerid = Integer.parseInt((session.getAttribute("customerid")+ ""));
String equipmentid = request.getParameter("equipmentid");
String servicetypeid = request.getParameter("servicetype");
String priorityid = request.getParameter("priority");
String pmid = request.getParameter("pm");
String problemdescription = request.getParameter("problemdescription");
String contactname = request.getParameter("name");
String contactphone = request.getParameter("phone");
String contactemail = request.getParameter("email");

if (pmid == null) {
	pmid = "0";
}

ServiceOrder so = new ServiceOrder();
so.setCustomerid(customerid);
so.setEquipmentid(Integer.parseInt(equipmentid));
so.setServicetypeid(Integer.parseInt(servicetypeid));
so.setPriorityid(Integer.parseInt(priorityid));
so.setPmid(Integer.parseInt(pmid));
so.setProblemdescription(problemdescription);
so.setContactname(contactname);
so.setContactphone(contactphone);
so.setContactemail(contactemail);
so.ServiceOrderCreate();

response.sendRedirect("newsoconfirm.jsp");

%>
